2005-08-30 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkentry.c (gtk_entry_class_init): Add key bindings to
+ make C-/ select all and C-\ unselect all. (#309301,
+ Kathy Fernandez)
+
* gtk/gtkimcontextsimple.c: Change the compose sequence for
soft hyphen to be multi_key-minus-minus-space, and add
compose sequences multi_key-minus-minus-period and
2005-08-30 Matthias Clasen <mclasen@redhat.com>
+ * gtk/gtkentry.c (gtk_entry_class_init): Add key bindings to
+ make C-/ select all and C-\ unselect all. (#309301,
+ Kathy Fernandez)
+
* gtk/gtkimcontextsimple.c: Change the compose sequence for
soft hyphen to be multi_key-minus-minus-space, and add
compose sequences multi_key-minus-minus-period and
"move_cursor", 3,
GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
G_TYPE_INT, 1,
- G_TYPE_BOOLEAN, TRUE);
+ G_TYPE_BOOLEAN, TRUE);
+ gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
+ "move_cursor", 3,
+ GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
+ G_TYPE_INT, -1,
+ G_TYPE_BOOLEAN, FALSE);
+ gtk_binding_entry_add_signal (binding_set, GDK_slash, GDK_CONTROL_MASK,
+ "move_cursor", 3,
+ GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_BUFFER_ENDS,
+ G_TYPE_INT, 1,
+ G_TYPE_BOOLEAN, TRUE);
+ /* Unselect all
+ */
+ gtk_binding_entry_add_signal (binding_set, GDK_backslash, GDK_CONTROL_MASK,
+ "move_cursor", 3,
+ GTK_TYPE_MOVEMENT_STEP, GTK_MOVEMENT_VISUAL_POSITIONS,
+ G_TYPE_INT, 0,
+ G_TYPE_BOOLEAN, FALSE);
/* Activate
*/
gtk_paint_focus (widget->style, widget->window, GTK_WIDGET_STATE (widget),
NULL, widget, "entry",
- x, y, width, height);
+ 0, 0, width, height);
}
}
gint current_x = get_better_cursor_x (entry, entry->current_pos);
gint bound_x = get_better_cursor_x (entry, entry->selection_bound);
- if (count < 0)
+ if (count <= 0)
new_pos = current_x < bound_x ? entry->current_pos : entry->selection_bound;
- else
+ else
new_pos = current_x > bound_x ? entry->current_pos : entry->selection_bound;
break;